﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using com.eforceglobal.crux.DTOs.Configuration;
using com.eforceglobal.crux.configuration;

namespace com.eforceglobal.crux.exceptions
{
    public class CruxApplicationErrorManager
    {
        public static ErrorInformation GetApplicationError(string NameOrCode)
        {
            ErrorInformation errorInformation = CruxConfigurationManager.GetErrorInformation(NameOrCode);
            return errorInformation;
        }

        public static ErrorInformation GetApplicationError(string NameOrCode, string DescriptionToOverride)
        {
            ErrorInformation errorInformation = CruxConfigurationManager.GetErrorInformation(NameOrCode);
            errorInformation.ErrorDescription = DescriptionToOverride;
            return errorInformation;
        }

       
    }
}
